Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Feature Documentation #154

Merged
merged 4 commits into from
Nov 4, 2024
Merged

Add Feature Documentation #154

merged 4 commits into from
Nov 4, 2024

Conversation

TTWNO
Copy link
Member

@TTWNO TTWNO commented Sep 7, 2024

Fix #153

@albertotirla albertotirla marked this pull request as ready for review September 10, 2024 17:37
@albertotirla
Copy link
Member

alright, it looks good from my perspective, however there's one more thing that could be done if you want.
Optionally, you could add more details about what it means to make a type and implement FromAsyncState for it, basically point the contributors to a minimal example where this is implemented, via a link they can click on to get to the files, perhaps the handler for focused events is simple enough?

CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated
- [ ] Decide what, if any, state is required for your feature (caret position, last focused item, etc.)
- For example: to know if the current window is focused, the current window must be stored in the state of the screen reader.
- [ ] Check to see if we already have your state info as a type; you can check this at `odilia/src/state.rs`.
- If not, make a [newtype](https://doc.rust-lang.org/book/ch19-04-advanced-types.html#using-the-newtype-pattern-for-type-safety-and-abstraction), add it to the `State` struct, then implement the `FromAsyncState` trait for the type (so it can be extracted by the `FromAsyncState` implementation).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if it wouldn't be better, from a document-source-reading perspective, if this URL were a named reference? You'd change the link here to something like,

[newtype][newtype-pat]

And waay at the bottom of the file, drop in:

[newtype-pat]: https://doc.rust-lang.org/book/ch19-04-advanced-types.html#using-the-newtype-pattern-for-type-safety-and-abstraction

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, that's debatable, as most people would read it in rendered form anyway. Definitely could be done though, if @TTWNO thinks it's better that way. If you read the markdown source though, it's definitely better to do it the way you suggest

@TTWNO TTWNO merged commit 0f5b0f9 into main Nov 4, 2024
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Write Docs on How To Add A Feature/Functionality
3 participants